clc
clear all

x =[1:20,20:40,40:60,60:80,80:100,100:120,120:140];
y =[zeros(1,20),ones(1,21),zeros(1,21),ones(1,21)*2,zeros(1,21),ones(1,21)*3,zeros(1,21)];

Save = figure('Color',[1 1 1]);
plot(x,y)
hold on
axis([0 140 -0.1 3.2])
xlabel('Tid [s]')
ylabel('Position x [m]')
legend('Referencesignal')
set(legend,'Position',[0.20 0.81 0.16 0.045]);

set(gcf,'PaperUnits','inches','PaperPosition',[0 +2 10 4])
print(Save,'-depsc','accepttest_x_pos.eps')